package VisitorPattern.example;

import VisitorPattern.example.framework.Visitor;

public class FileSystem extends Entry {
    private String name;
    private Directory root;

    public FileSystem(String name, Directory root) {
        this.name = name;
        this.root = root;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public int getSize() {
        return root.getSize();
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public Directory getRoot() {
        return this.root;
    }
}
